package com.atguigu.j_concat;

import java.util.stream.Stream;

public class Demo {
    public static void main(String[] args) {
        //创建2个流对象
        Stream<Integer> stream1 = Stream.of(1, 2, 3, 4, 5);
        Stream<String> stream2 = Stream.of("6", "7", "8", "9", "10");


        Stream<Object> concat = Stream.concat(stream1, stream2);


        //出流
        long count = concat.count();
        System.out.println("count = " + count);
    }
}
